<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <div id="app">
        <input type="text" v-model="firstName" placeholder="firstName">
        <input type="text" v-model="lastName" placeholder="lastName">
        <input type="text" v-model="fullName" placeholder="fullName">
    </div>
    <script src="js/vue.js"></script>
    <script>
        var vm = new Vue({
            el: '#app',
            data: {
                firstName:'',
                lastName:''
            },
            computed:{
                fullName:{
                    get:function(){
                        return this.firstName + ' ' + this.lastName;
                    },
                    set:function(newValue){
                        var names = newValue.split(' ')
                        this.firstName = names[0]
                        this.lastName = names[1]
                    }
                }
            },
            methods: {}
        });
    </script>
</body>

</html>